<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>IgH EtherCAT Master: device.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">IgH EtherCAT Master
   &#160;<span id="projectnumber">1.5.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('device_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">device.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>EtherCAT device methods.  
<a href="#details">More...</a></p>

<p><a href="device_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4984e3e354110c1f4694fd521491cc30"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#a4984e3e354110c1f4694fd521491cc30">ec_device_init</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device, <a class="el" href="group__ApplicationInterface.html#ga60ec31b46fcf7994c511359402c64baa">ec_master_t</a> *master)</td></tr>
<tr class="memdesc:a4984e3e354110c1f4694fd521491cc30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a4984e3e354110c1f4694fd521491cc30">More...</a><br /></td></tr>
<tr class="separator:a4984e3e354110c1f4694fd521491cc30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad42f994e302efd7c59fc64bfc84f6037"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#ad42f994e302efd7c59fc64bfc84f6037">ec_device_clear</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:ad42f994e302efd7c59fc64bfc84f6037"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ad42f994e302efd7c59fc64bfc84f6037">More...</a><br /></td></tr>
<tr class="separator:ad42f994e302efd7c59fc64bfc84f6037"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20976f86443d49ebf67caf83d4c0e156"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#a20976f86443d49ebf67caf83d4c0e156">ec_device_attach</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device, struct net_device *net_dev, <a class="el" href="ecdev_8h.html#a789bcd88d869f88c58bd13b451b3fd52">ec_pollfunc_t</a> poll, struct module *module)</td></tr>
<tr class="memdesc:a20976f86443d49ebf67caf83d4c0e156"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associate with net_device.  <a href="#a20976f86443d49ebf67caf83d4c0e156">More...</a><br /></td></tr>
<tr class="separator:a20976f86443d49ebf67caf83d4c0e156"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12e63c43b18c206ba32fdb2a3d668bb8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#a12e63c43b18c206ba32fdb2a3d668bb8">ec_device_detach</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:a12e63c43b18c206ba32fdb2a3d668bb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnect from net_device.  <a href="#a12e63c43b18c206ba32fdb2a3d668bb8">More...</a><br /></td></tr>
<tr class="separator:a12e63c43b18c206ba32fdb2a3d668bb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec3d7ce9ab236b9626efefbc8c2ffd96"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#aec3d7ce9ab236b9626efefbc8c2ffd96">ec_device_open</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:aec3d7ce9ab236b9626efefbc8c2ffd96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens the EtherCAT device.  <a href="#aec3d7ce9ab236b9626efefbc8c2ffd96">More...</a><br /></td></tr>
<tr class="separator:aec3d7ce9ab236b9626efefbc8c2ffd96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d4eadd4b9da0e4298818434e1b78a9a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#a1d4eadd4b9da0e4298818434e1b78a9a">ec_device_close</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:a1d4eadd4b9da0e4298818434e1b78a9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the EtherCAT device.  <a href="#a1d4eadd4b9da0e4298818434e1b78a9a">More...</a><br /></td></tr>
<tr class="separator:a1d4eadd4b9da0e4298818434e1b78a9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac301d857a14ce98a79ffb12a7757bd09"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#ac301d857a14ce98a79ffb12a7757bd09">ec_device_tx_data</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:ac301d857a14ce98a79ffb12a7757bd09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the device's transmit memory.  <a href="#ac301d857a14ce98a79ffb12a7757bd09">More...</a><br /></td></tr>
<tr class="separator:ac301d857a14ce98a79ffb12a7757bd09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad46f8a21db1dd635d52bbae01b3f467f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#ad46f8a21db1dd635d52bbae01b3f467f">ec_device_send</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device, size_t size)</td></tr>
<tr class="memdesc:ad46f8a21db1dd635d52bbae01b3f467f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends the content of the transmit socket buffer.  <a href="#ad46f8a21db1dd635d52bbae01b3f467f">More...</a><br /></td></tr>
<tr class="separator:ad46f8a21db1dd635d52bbae01b3f467f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac74ba2bebd2ed2468ec5b7942555ae9d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#ac74ba2bebd2ed2468ec5b7942555ae9d">ec_device_clear_stats</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:ac74ba2bebd2ed2468ec5b7942555ae9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the frame statistics.  <a href="#ac74ba2bebd2ed2468ec5b7942555ae9d">More...</a><br /></td></tr>
<tr class="separator:ac74ba2bebd2ed2468ec5b7942555ae9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6944619b6e1c0f85d5f7d124a0a71af2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#a6944619b6e1c0f85d5f7d124a0a71af2">ec_device_poll</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:a6944619b6e1c0f85d5f7d124a0a71af2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls the poll function of the assigned net_device.  <a href="#a6944619b6e1c0f85d5f7d124a0a71af2">More...</a><br /></td></tr>
<tr class="separator:a6944619b6e1c0f85d5f7d124a0a71af2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a158275fbb94b82be5d551044f38981f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="device_8c.html#a158275fbb94b82be5d551044f38981f4">ec_device_update_stats</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:a158275fbb94b82be5d551044f38981f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update device statistics.  <a href="#a158275fbb94b82be5d551044f38981f4">More...</a><br /></td></tr>
<tr class="separator:a158275fbb94b82be5d551044f38981f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3934f8a07aa394d558147d790fc60a8b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DeviceInterface.html#ga3934f8a07aa394d558147d790fc60a8b">ecdev_withdraw</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:ga3934f8a07aa394d558147d790fc60a8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Withdraws an EtherCAT device from the master.  <a href="group__DeviceInterface.html#ga3934f8a07aa394d558147d790fc60a8b">More...</a><br /></td></tr>
<tr class="separator:ga3934f8a07aa394d558147d790fc60a8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34eceaecfe6ab4fe8f0ecde1a3b311c4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DeviceInterface.html#ga34eceaecfe6ab4fe8f0ecde1a3b311c4">ecdev_open</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:ga34eceaecfe6ab4fe8f0ecde1a3b311c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens the network device and makes the master enter IDLE phase.  <a href="group__DeviceInterface.html#ga34eceaecfe6ab4fe8f0ecde1a3b311c4">More...</a><br /></td></tr>
<tr class="separator:ga34eceaecfe6ab4fe8f0ecde1a3b311c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0a6b26b2397aa49cc82915a12b8cc854"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DeviceInterface.html#ga0a6b26b2397aa49cc82915a12b8cc854">ecdev_close</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:ga0a6b26b2397aa49cc82915a12b8cc854"><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes the master leave IDLE phase and closes the network device.  <a href="group__DeviceInterface.html#ga0a6b26b2397aa49cc82915a12b8cc854">More...</a><br /></td></tr>
<tr class="separator:ga0a6b26b2397aa49cc82915a12b8cc854"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf02497a3d6bb0e43dcefc1802f8666a5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DeviceInterface.html#gaf02497a3d6bb0e43dcefc1802f8666a5">ecdev_receive</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device, const void *data, size_t size)</td></tr>
<tr class="memdesc:gaf02497a3d6bb0e43dcefc1802f8666a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accepts a received frame.  <a href="group__DeviceInterface.html#gaf02497a3d6bb0e43dcefc1802f8666a5">More...</a><br /></td></tr>
<tr class="separator:gaf02497a3d6bb0e43dcefc1802f8666a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac1d0e31b8b60ad4e94c03148aac88499"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DeviceInterface.html#gac1d0e31b8b60ad4e94c03148aac88499">ecdev_set_link</a> (<a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device, uint8_t state)</td></tr>
<tr class="memdesc:gac1d0e31b8b60ad4e94c03148aac88499"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a new link state.  <a href="group__DeviceInterface.html#gac1d0e31b8b60ad4e94c03148aac88499">More...</a><br /></td></tr>
<tr class="separator:gac1d0e31b8b60ad4e94c03148aac88499"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa31bc8d955fea01e8430105c61064589"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DeviceInterface.html#gaa31bc8d955fea01e8430105c61064589">ecdev_get_link</a> (const <a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *device)</td></tr>
<tr class="memdesc:gaa31bc8d955fea01e8430105c61064589"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the link state.  <a href="group__DeviceInterface.html#gaa31bc8d955fea01e8430105c61064589">More...</a><br /></td></tr>
<tr class="separator:gaa31bc8d955fea01e8430105c61064589"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>EtherCAT device methods. </p>

<p class="definition">Definition in file <a class="el" href="device_8c_source.html">device.c</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a4984e3e354110c1f4694fd521491cc30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4984e3e354110c1f4694fd521491cc30">&#9670;&nbsp;</a></span>ec_device_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_device_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__ApplicationInterface.html#ga60ec31b46fcf7994c511359402c64baa">ec_master_t</a> *&#160;</td>
          <td class="paramname"><em>master</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, else &lt; 0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
    <tr><td class="paramname">master</td><td>master owning the device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00063">63</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="ad42f994e302efd7c59fc64bfc84f6037"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad42f994e302efd7c59fc64bfc84f6037">&#9670;&nbsp;</a></span>ec_device_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_device_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00162">162</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="a20976f86443d49ebf67caf83d4c0e156"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20976f86443d49ebf67caf83d4c0e156">&#9670;&nbsp;</a></span>ec_device_attach()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_device_attach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct net_device *&#160;</td>
          <td class="paramname"><em>net_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#a789bcd88d869f88c58bd13b451b3fd52">ec_pollfunc_t</a>&#160;</td>
          <td class="paramname"><em>poll</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct module *&#160;</td>
          <td class="paramname"><em>module</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Associate with net_device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
    <tr><td class="paramname">net_dev</td><td>net_device structure </td></tr>
    <tr><td class="paramname">poll</td><td>pointer to device's poll function </td></tr>
    <tr><td class="paramname">module</td><td>the device's module </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00182">182</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="a12e63c43b18c206ba32fdb2a3d668bb8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12e63c43b18c206ba32fdb2a3d668bb8">&#9670;&nbsp;</a></span>ec_device_detach()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_device_detach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disconnect from net_device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00213">213</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="aec3d7ce9ab236b9626efefbc8c2ffd96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec3d7ce9ab236b9626efefbc8c2ffd96">&#9670;&nbsp;</a></span>ec_device_open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_device_open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens the EtherCAT device. </p>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, else &lt; 0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00242">242</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="a1d4eadd4b9da0e4298818434e1b78a9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d4eadd4b9da0e4298818434e1b78a9a">&#9670;&nbsp;</a></span>ec_device_close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ec_device_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stops the EtherCAT device. </p>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, else &lt; 0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00279">279</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="ac301d857a14ce98a79ffb12a7757bd09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac301d857a14ce98a79ffb12a7757bd09">&#9670;&nbsp;</a></span>ec_device_tx_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t* ec_device_tx_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a pointer to the device's transmit memory. </p>
<dl class="section return"><dt>Returns</dt><dd>pointer to the TX socket buffer </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00312">312</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="ad46f8a21db1dd635d52bbae01b3f467f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad46f8a21db1dd635d52bbae01b3f467f">&#9670;&nbsp;</a></span>ec_device_send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_device_send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends the content of the transmit socket buffer. </p>
<p>Cuts the socket buffer content to the (now known) size, and calls the start_xmit() function of the assigned net_device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
    <tr><td class="paramname">size</td><td>number of bytes to send </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00331">331</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="ac74ba2bebd2ed2468ec5b7942555ae9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac74ba2bebd2ed2468ec5b7942555ae9d">&#9670;&nbsp;</a></span>ec_device_clear_stats()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_device_clear_stats </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the frame statistics. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00374">374</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="a6944619b6e1c0f85d5f7d124a0a71af2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6944619b6e1c0f85d5f7d124a0a71af2">&#9670;&nbsp;</a></span>ec_device_poll()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_device_poll </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calls the poll function of the assigned net_device. </p>
<p>The master itself works without using interrupts. Therefore the processing of received data and status changes of the network device has to be done by the master calling the ISR "manually". </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00478">478</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
<a id="a158275fbb94b82be5d551044f38981f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a158275fbb94b82be5d551044f38981f4">&#9670;&nbsp;</a></span>ec_device_update_stats()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ec_device_update_stats </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ecdev_8h.html#ac0895793ea540357d225d4b8be71f2e4">ec_device_t</a> *&#160;</td>
          <td class="paramname"><em>device</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update device statistics. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>EtherCAT device </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="device_8c_source.html#l00496">496</a> of file <a class="el" href="device_8c_source.html">device.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_c1346cf4828efdd0d2baf0d391d01b77.html">master</a></li><li class="navelem"><a class="el" href="device_8c.html">device.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
